<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Reg extends CI_Controller {

	public function index($id=90)
	{
		var_dump($id);
		$this->load->view('reg');
	}

	public function show()
	{
		echo "89898";
	}

	public function code()
	{
		$this->load->helper('captcha');

		$vals = array(
		    'img_path'  => './captcha/',
		    'img_url'   => '/p201802/ci/captcha/',
		    'img_width' => 200,
		    'img_height'    => 50,
		    'expiration'    => 7200,
		    'word_length'   => 4,
		    'font_size' => 48,
		    'img_id'    => 'Imageid',
		    'pool'      => '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',

		    // White background and border, black text and red grid
		    'colors'    => array(
		        'background' => array(255, 255, 255),
		        'border' => array(255, 255, 255),
		        'text' => array(0, 0, 0),
		        'grid' => array(255, 40, 40)
		    )
		);

		$cap = create_captcha($vals);
		// var_dump($cap);
		echo $cap['image'];
	}
}
